package com.ocom.company.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ocom.common.entity.pay.EntityAppConfig;
import com.ocom.common.vo.company.GzhComListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IDaoAppConfig extends BaseMapper<EntityAppConfig> {


	@Select({"<script>",
			"select \n" +
					"c.com_id , c.com_name , a.bind as modeN \n" +
					"FROM app_config a \n" +
					"left join company_list c on a.com_id = c.com_id   \n" +
					"where a.gzh_appid  = #{agentAppid}"+
					" AND  a.bind > 0 "+
					"</script>"})
	List<GzhComListVo> getCompanyListByAgentGzhBind(@Param("agentAppid")String agentAppid,@Param("bingRegister")Integer bingRegister);


	@Select({"<script>",
			"select \n" +
					"c.com_id , c.com_name , a.register as modeN \n" +
					"FROM app_config a \n" +
					"left join company_list c on a.com_id = c.com_id   \n" +
					"where a.gzh_appid  = #{agentAppid}"+
					" AND a.register > 0  "+
					"</script>"})
	List<GzhComListVo> getCompanyListByAgentGzhRegister(@Param("agentAppid")String agentAppid,@Param("bingRegister")Integer bingRegister);
}
